# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-openssl
_pkgname=pyOpenSSL
pkgver=21.0.0
pkgrel=1
pkgdesc="Python3 wrapper module around the OpenSSL library"
url="https://github.com/pyca/pyopenssl"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-cryptography py3-six"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check" # depends on flaky

replaces="py-openssl" # Backwards compatibility
provides="py-openssl=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
ca772a420b13b1e3c421170baab031d4769d77539eb5ad3eb0fda409aa8692596ce85d21b244b6e49e70fd35609b64190dcbc4fc8d4493292bac19b7856d5175  pyOpenSSL-21.0.0.tar.gz
"
